package com.zhenlong01.zhentest.controller;

import com.zhenlong01.zhentest.util.SMSUtil;
import org.springframework.data.redis.core.RedisTemplate;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;

/**
 * @author Administrator
 * @date 2019-08-27 11:28
 */
@RestController
public class SMSController {

    @Resource
    RedisTemplate<String,Object> redisTemplate;

    @GetMapping("sendsms")
    public boolean sendSms(String tel){
        return  SMSUtil.sendMsg(tel,redisTemplate);
    }


}
